import 'package:flutter/material.dart';

class ListWidget<T> extends StatefulWidget {
  final List<ItemWidget<T>> items;

  const ListWidget({super.key, required this.items});

  @override
  State<ListWidget> createState() => _ListWidgetState<T>(items: items);
}

class _ListWidgetState<T> extends State<ListWidget> {
  final List<ItemWidget<T>> items;

  _ListWidgetState({required this.items});

  @override
  Widget build(BuildContext context) {
    return ListView(children: items);
  }
}

abstract class ItemWidget<T> extends Widget {
  final T data;

  const ItemWidget({super.key, required this.data});
}


class CustomCardController {

  ValueNotifier<double> width = ValueNotifier(100);
  ValueNotifier<Color> color = ValueNotifier(Colors.red[100]!);
  ValueNotifier<String> text = ValueNotifier('Card');
}